home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue49 / ComCorn / SteveAddIn_TLB.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1999-08-02  |  4.5 KB  |  100 lines

  1. unit SteveAddIn_TLB;
  2.  
  3. // ************************************************************************ //
  4. // WARNING                                                                  //
  5. // -------                                                                  //
  6. // The types declared in this file were generated from data read from a     //
  7. // Type Library. If this type library is explicitly or indirectly (via      //
  8. // another type library referring to this type library) re-imported, or the //
  9. // 'Refresh' command of the Type Library Editor activated while editing the //
  10. // Type Library, the contents of this file will be regenerated and all      //
  11. // manual modifications will be lost.                                       //
  12. // ************************************************************************ //
  13.  
  14. // PASTLWTR : $Revision:   1.11.1.75  $
  15. // File generated on 8/2/99 3:20:29 AM from Type Library described below.
  16.  
  17. // ************************************************************************ //
  18. // Type Lib: X:\My Documents\DelphiMag\DelphiMag,Sep99\SteveAddIn.tlb
  19. // IID\LCID: {7CFA22BC-9A8C-439B-BBCB-86AFB384C39D}\0
  20. // Helpfile: 
  21. // HelpString: Project1 Library
  22. // Version:    1.0
  23. // ************************************************************************ //
  24.  
  25. interface
  26.  
  27. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL, 
  28.   AddInDesignerObjects_TLB;
  29.  
  30. // *********************************************************************//
  31. // GUIDS declared in the TypeLibrary. Following prefixes are used:      //
  32. //   Type Libraries     : LIBID_xxxx                                    //
  33. //   CoClasses          : CLASS_xxxx                                    //
  34. //   DISPInterfaces     : DIID_xxxx                                     //
  35. //   Non-DISP interfaces: IID_xxxx                                      //
  36. // *********************************************************************//
  37. const
  38.   LIBID_SteveAddIn: TGUID = '{7CFA22BC-9A8C-439B-BBCB-86AFB384C39D}';
  39.   IID_ISteveAddIn: TGUID = '{3466B12F-5846-46BD-B561-13ACA8F7C591}';
  40.   CLASS_SteveAddIn_: TGUID = '{8264FC01-ABE2-44AF-96F6-70DE94C219C7}';
  41. type
  42.  
  43. // *********************************************************************//
  44. // Forward declaration of interfaces defined in Type Library            //
  45. // *********************************************************************//
  46.   ISteveAddIn = interface;
  47.   ISteveAddInDisp = dispinterface;
  48.  
  49. // *********************************************************************//
  50. // Declaration of CoClasses defined in Type Library                     //
  51. // (NOTE: Here we map each CoClass to its Default Interface)            //
  52. // *********************************************************************//
  53.   SteveAddIn_ = ISteveAddIn;
  54.  
  55.  
  56. // *********************************************************************//
  57. // Interface: ISteveAddIn
  58. // Flags:     (4416) Dual OleAutomation Dispatchable
  59. // GUID:      {3466B12F-5846-46BD-B561-13ACA8F7C591}
  60. // *********************************************************************//
  61.   ISteveAddIn = interface(_IDTExtensibility2)
  62.     ['{3466B12F-5846-46BD-B561-13ACA8F7C591}']
  63.   end;
  64.  
  65. // *********************************************************************//
  66. // DispIntf:  ISteveAddInDisp
  67. // Flags:     (4416) Dual OleAutomation Dispatchable
  68. // GUID:      {3466B12F-5846-46BD-B561-13ACA8F7C591}
  69. // *********************************************************************//
  70.   ISteveAddInDisp = dispinterface
  71.     ['{3466B12F-5846-46BD-B561-13ACA8F7C591}']
  72.     procedure OnConnection(const Application_: IDispatch; ConnectMode: ext_ConnectMode; 
  73.                            const AddInInst: IDispatch; var custom: {??PSafeArray} OleVariant); dispid 1;
  74.     procedure OnDisconnection(RemoveMode: ext_DisconnectMode; var custom: {??PSafeArray} OleVariant); dispid 2;
  75.     procedure OnAddInsUpdate(var custom: {??PSafeArray} OleVariant); dispid 3;
  76.     procedure OnStartupComplete(var custom: {??PSafeArray} OleVariant); dispid 4;
  77.     procedure OnBeginShutdown(var custom: {??PSafeArray} OleVariant); dispid 5;
  78.   end;
  79.  
  80.   CoSteveAddIn_ = class
  81.     class function Create: ISteveAddIn;
  82.     class function CreateRemote(const MachineName: string): ISteveAddIn;
  83.   end;
  84.  
  85. implementation
  86.  
  87. uses ComObj;
  88.  
  89. class function CoSteveAddIn_.Create: ISteveAddIn;
  90. begin
  91.   Result := CreateComObject(CLASS_SteveAddIn_) as ISteveAddIn;
  92. end;
  93.  
  94. class function CoSteveAddIn_.CreateRemote(const MachineName: string): ISteveAddIn;
  95. begin
  96.   Result := CreateRemoteComObject(MachineName, CLASS_SteveAddIn_) as ISteveAddIn;
  97. end;
  98.  
  99. end.
  100.